﻿<Window x:Class="InputBindingStudio.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="409" Width="908"
        x:Name="_inputBindingStudio">

    <Window.Resources>
        <CollectionViewSource x:Key="_bindingsSource" Source="{Binding ElementName=_inputBindingStudio, Path=Bindings}"></CollectionViewSource>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Menu Grid.Row="0">
            <MenuItem Header="New Collection" Click="OnNewCollectionClick"></MenuItem> 
            <MenuItem Header="New Binding" Click="NewBindingClick"></MenuItem>
        </Menu>
        <ListBox Grid.Row="1" ItemsSource="{Binding Source={StaticResource _bindingsSource}}" IsSynchronizedWithCurrentItem="True">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <Label Content="{Binding Value.ID}"></Label>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>

</Window>
